package com.ycl.productservice.client;

import com.ycl.productservice.entity.PageVO;
import com.ycl.productservice.entity.Order;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class OrderServiceFeignClientFallback implements OrderFeignClient {

    @Override
    public ResponseEntity<Order> findOrderById(Integer id) {
        Order order = new Order();
        order.setId(-1); // 设置降级标识
        return ResponseEntity.ok(order);
    }

    @Override
    public ResponseEntity<List<Order>> findAllOrders() {
        return null;
    }

    @Override
    public ResponseEntity<PageVO> findOrdersPage(Integer current, Integer pageSize) {
        return null;
    }

    @Override
    public ResponseEntity<String> addOrder(Order order) {
        return null;
    }

    @Override
    public ResponseEntity<String> updateOrder(Order order) {
        return null;
    }

    @Override
    public ResponseEntity<String> deleteOrder(Integer id) {
        return null;
    }
}